<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let Date1 = new Date();

        let year = Date1.getFullYear();
        let mon = Date1.getMonth()+1 + '';
        let day = Date1.getDate() + '';

        let hour = Date1.getHours()+'';
        let min = Date1.getMinutes();
        let sec = Date1.getSeconds();

        console.log(`${year}-${mon.padStart(2,'0')}-${day.padStart(2,'0')} ${hour.padStart(2,'0')}:${min}:${sec}`);
    </script>
</body>
</html>